Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda_mirror.py: log download errors instead of breaking and clearing… #71

Merged
merged 2 commits into from Oct 18, 2018

Conversation

magnuhho
Copy link
Contributor

By default conda-mirror will continue pulling files until it either succeeds or dies from some sort of error.
If an error is encountered, all downloaded files residing in "temp space" will be deleted.

This change logs exceptions that occur during download so that the files that actually download successfully will be verified and moved to the target folder.

@parente parente closed this Sep 25, 2018
@parente parente reopened this Sep 25, 2018
_download(url, download_dir)
summary['downloaded'].add((url, download_dir))
except:
logger.error('Unexpected error: %s. Aborting download.', sys.exc_info()[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rendering the full stack trace with logger.exception('Unexpected error: Aborting download') would be better here?

@codecov-io
Copy link

codecov-io commented Oct 13, 2018

Codecov Report

Merging #71 into master will decrease coverage by 2.99%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #71   +/-   ##
=======================================
- Coverage   96.88%   93.89%   -3%     
=======================================
  Files           2        2           
  Lines         257      262    +5     
=======================================
- Hits          249      246    -3     
- Misses          8       16    +8
Impacted Files Coverage Δ
conda_mirror/conda_mirror.py 93.82% <100%> (-3.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f92926...e3c9a0d. Read the comment docs.

@parente parente merged commit 58f2a38 into vericast:master Oct 18, 2018
magnuhho added a commit to magnuhho/conda-mirror that referenced this pull request Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants